{% extends "_public/main.phtml" %}

{% block seo %}
<title>{{ category_title.title }} 分类下的文章{% if articles.currentPage != 1 %} - 第{{ articles.currentPage }}页{% endif %} - {{ site_config.site_name}}</title>
{% endblock %}

{% block sitetitle %}
<div class="category-title">
    <div class="container">{{ category_title.title }} 分类下的文章</div>
</div>
{% endblock %}

{% block article %}

<section class="index-main">
    <div class="container">
        <div class="row">
            <div class="col-md-8">

                {% for article in articles %}
                <article class="article-list">
                    <h1><a href="/article/{{ article.id }}.html" title="{{ article.title }}">{{ article.title }}</a></h1>
                    <div class="article-tags">
                        {% for tag in article.tags %}
                        <a href="/tags/{{ tag.id }}.html" class="badge badge-info" title="{{ tag.tag }} 标签下的文章">{{ tag.tag }}</a>
                        {% endfor %}
                    </div>
                    {% if article.thumb != '' %}
                    <div class="article-thumb">
                        <img src="{{ article.thumb }}" alt="{{ article.title }}" title="{{ article.title }}">
                    </div>
                    {% endif %}
                    <div class="article-abstract">

                        {{ article.content | striptags | truncate(128, false, "...")}}

                    </div>
                    <div class="article-info">
                        <span>{{ article.create_time|date('Y-m-d H:i') }}</span>
                        <span>热度 {{ article.click }} ℃</span>
                        <span><a href="/article/{{ article.id }}.html">全文链接</a></span>
                    </div>
                </article>
                {% endfor %}

                {{ pager | raw }}

            </div>
            <div class="col-md-4">

                {{ include('_public/tags.phtml')}}

                {{ include('_public/reply.phtml')}}

            </div>
        </div>
    </div>
</section>

{% endblock %}